package com.woniuxy01;

import java.util.Scanner;

public class Test09 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] scores = new int[]{1,2,11,56,23,78,3,4,5};
        System.out.println("输入要查找的元素");
        int num = sc.nextInt();
        boolean flag = false;
        for (int i = 0; i < scores.length; i++) {
            if (num == scores[i]) {
                flag = true;
                break;
            }
        }
//        if(flag){
//            System.out.println("元素存在");
//        }else{
//            System.out.println("元素不存在");
//        }
        System.out.println("元素"+(flag?"":"不")+"存在");
    }
}
